package recursion.leetcode.easy;

/**
 * @author bruin_du
 * @description 青蛙跳台阶问题
 * @date 2022/5/24 15:13
 **/
public class Offer10II_NumWays {
    public int numWays(int n) {
        int a = 1,b = 1,c = 0;
        for(int i = 0 ; i < n ; i++){
            c = (a + b) % 1000000007;
            a = b;
            b = c;
        }
        return a;
    }
}
